X-Git-Url: https://git.r.bdr.sh/rbdr/super-polarity/blobdiff_plain/74c155708d85abfc2cf227c08de4f27003015b3f..0cafec445af0a97d96feb1a1daefa1486142c73f:/Super%20Polarity/Widget.cs diff --git a/Super Polarity/Widget.cs b/Super Polarity/Widget.cs index 65c3fd2..ea92cfd 100644 --- a/Super Polarity/Widget.cs +++ b/Super Polarity/Widget.cs @@ -2,14 +2,40 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; namespace SuperPolarity { class Widget { - public IList Children; + public List Children; public Dictionary>> Listeners; + public Vector2 Position; + public SuperPolarity Game; + + protected bool Active; + + public Widget(SuperPolarity game, Vector2 position) + { + Game = game; + Position = position; + Active = false; + Children = new List(); + Listeners = new Dictionary>>(); + } + + public void Activate() + { + Active = true; + } + + public void Deactivate() + { + Active = false; + } + public virtual void AppendChild(Widget widget) { Children.Add(widget); @@ -54,5 +80,13 @@ namespace SuperPolarity method(value); } } + + public virtual void Update(GameTime gameTime) + { + } + + public virtual void Draw(SpriteBatch spriteBatch) + { + } } }